use "C:\Users\jrichman\Box Sync\2018 State Elections Paper\CCES14_Common_Content_Validated.dta"

generate CC14_413d_REP = 1 if CC413d ==2
replace CC14_413d_REP = 0 if CC413d ==1
generate Obamadisapproval = CC14_308a if CC14_308a <5
generate Legdisapproval = CC14_308e if CC14_308e <5
generate RepPartyLowChamBelief = 0
replace RepPartyLowChamBelief = 1 if CC14_309d == 1
generate DemPartyLowChamBelief = 0
replace DemPartyLowChamBelief = 1 if CC14_309d == 2

// Obama only
logit CC14_413d_REP i.Obamadisapproval

// Legislative Approval Only

logit CC14_413d_REP c.Legdisapproval##i.RepPartyLowChamBelief


// with Obama disapproval
logit CC14_413d_REP i.gender i.educ i.race i.region i.Obamadisapproval c.Legdisapproval##i.RepPartyLowChamBelief i.child18 i.unionhh i.CC334A i.CC14_302 i.pid7

// without Obama disapproval
logit CC14_413d_REP i.gender i.educ i.race i.region c.Legdisapproval##i.RepPartyLowChamBelief i.child18 i.unionhh i.CC334A i.CC14_302 i.pid7

tabulate CC14_413d_REP race [aweight = weight], column

tabulate race CC14_413d_REP  [aweight = weight], column
